package cn.waqwb.bwcar.controller;



import cn.waqwb.bwcar.pojo.SysUser;
import cn.waqwb.bwcar.service.SysUserService;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author JokerQ
 * @date 2019/11/6 - 17:49
 */
@Controller
public class SysUserController {
    @Autowired
    private SysUserService sysUserService;

    @RequestMapping("/findAll")
    @ResponseBody
    @RequiresRoles("waqwb")
    public List<SysUser> findAll(){
        //int i = 1/0;
        return sysUserService.findAll();
    }


}
